from 随机漫步.random_walk import RandomWalk
import matplotlib.pyplot as plt


random_walk = RandomWalk()
random_walk.walk()

# 设置屏幕大小
plt.figure(dpi=192, figsize=(19, 10))

plt.scatter(random_walk.start_x, random_walk.start_y, c=random_walk.start_y, cmap=plt.cm.Reds, edgecolors=None, s=10)

# 突出起点和终点
plt.scatter(random_walk.start_x[0], random_walk.start_y[0], c='red', edgecolors=None, s=100)
plt.scatter(random_walk.start_x[-1], random_walk.start_y[-1], c='blue', edgecolors=None, s=100)

# 隐藏坐标轴
plt.axes().get_xaxis().set_visible(False)
plt.axes().get_yaxis().set_visible(False)


plt.savefig('random_walk.png')

plt.show()